<!DOCTYPE html>
<head>
    <meta charset="utf-8" />
    <meta name="renderer" content="webkit">
    <meta name="keywords" content="BidCms(必得),微信商城,粉丝营销,微信商城运营" />
    <meta name="description" content="BidCms(必得)是帮助商家在微信上搭建微信商城的平台，提供店铺、商品、订单、物流、消息和客户的管理模块，同时还提供丰富的营销应用和活动插件。" />
    <title>
    BidCms(必得) - 免费的微商城    </title>
    <link rel="icon" href="${webRoot}/static/v2/image/yz_fc.ico" />

	<link rel="stylesheet" href="${webRoot}/static/v2/build_css/stylesheets/intro/projects/intro.css" >
    <link rel="stylesheet" href="${webRoot}/static/v2/vendor/videojs/video-js.css" >    
	<link rel="stylesheet" href="${webRoot}/static/v2/build_css/stylesheets/intro/pages/dashboard.css" >
    
</head>
<body>

<!-- 店铺案例 -->

    <div class="container main-container">

        <div class="page-index">
    
    <div class="index-case">
        <div class="bottom-logo-wrap">
    <a href="http://bidcms.com/"><div class="logo"></div></a>
    <h3 class="bottom-logo-title">免费的微商城</h3>
</div> 
        <br/><br/>
        <a href="javascript:void(0);" class="left-btn"></a>
        <a href="javascript:void(0);" class="right-btn"></a>
        <div class="case-viewport">
			<div class="case-container" id="example-store">
			</div>
		</div>
    </div>
</div>

   
</div>
	
    <script src="${webRoot}/static/v2/vendor/jquery-1.10.2.js" ></script>    
	<script src="${webRoot}/static/v2/vendor/underscore-min.js" ></script>    
	<script src="http://www.bidcms.com/store/example.js" ></script>
	
	<script>
    (function($) {
        var slider = $('.case-viewport'),
            container = slider.find('.case-container'),
            slides = container.find('.widget-big-case'),
            slideWidth = slides.eq(0).outerWidth(),
            count = slides.length,
            visSlideCount = 2,
            slideDist = 1,
            currentSlide = 0,
            newSlides,
            target;

        // 复制首尾slide
        container.append(slides.filter(':lt(' + visSlideCount + ')').clone().addClass('clone'))
                 .prepend(slides.filter(':gt(' + (count - visSlideCount - 1) + ')').clone().addClass('clone'));
        newSlides = container.find('.widget-big-case');

        function getTarget(dir) {
            if (dir === "next") {
                return (currentSlide === count - 1) ? 0 : currentSlide + 1;
            } else {
                return (currentSlide === 0) ? count - 1 : currentSlide - 1;
            }
        }

        function animate(direction) {
            var margin;
            target = getTarget(direction);

            // 计算容器偏移量
            if (currentSlide === 0 && target === count - 1) {
                margin = (visSlideCount - slideDist) * slideWidth;
            } else if (currentSlide === count - 1 && target === 0) {
                margin = (count + visSlideCount) * slideWidth;
            } else {
                margin = (target + visSlideCount) * slideWidth;
            }

            // 平移动画
            setProps(margin, 400);
        }

        function setProps(pos, dur) {
            pos = (-1 * pos) + 'px';
            if (!container.is(':animated')) {
                container.animate({
                    marginLeft: pos
                }, dur, function() {
                    // 首页左移与末页右移动画结束后调整容器位置
                    if (currentSlide === 0 && target === count - 1) {
                        adjust(slideWidth * (count + visSlideCount - slideDist));
                    } else if (currentSlide === count - 1 && target === 0){
                        adjust(slideWidth * visSlideCount);
                    }
                    currentSlide = target;
                });
            }
        }

        function adjust(pos) {
            pos = (-1 * pos) + 'px';
            container.css('marginLeft', pos);
        }

        $('.left-btn').on('click', function() {
            animate('prev');
        });
        $('.right-btn').on('click', function() {
            animate('next');
        });

        slider.delegate('.js-case-qrcode', 'mouseover', function(){
            var elem = $(this).find('.js-qrcode'),
                src = elem.attr('src');
            if(!src){
                console.log(elem[0], src);

                elem.attr('src', elem.data('src'));
            }
        });

        adjust(slideWidth * visSlideCount);
    }(jQuery));
</script>
    <?php include bidcms_template('pc_footer');?>

</body>
</html>